<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%
	String path=request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style type="text/css">
	.error {
			color: #ff0000;
	}
	.errorblock {
		color: #000;
		background-color: #ffEEEE;
		border: 3px solid #ff0000;
		padding: 8px;
		margin: 16px;
	}
</style>
</head>
<body>
<h2>Customer SignUp Form - JSR303 @Valid example</h2>
<form:form id="fm" action="${basePath}/signup.action" method="post" commandName="building">
  <form:errors path="*" cssClass="errorblock" element="div"/>
	<table>
		<tr>
			<td><form:label path="bid">楼宇编号</form:label></td>
			<td><form:input path="bid"/></td>
			<td><form:label path="area">区域位置</form:label></td>
			<td><form:input path="area"/></td>
		</tr>
		<tr>
			<td><form:label path="name">楼宇名称</form:label></td>
			<td><form:input path="name"/><form:errors path="name" cssClass="error"/></td>
			<td><form:label path="size">建筑面积</form:label></td>
			<td><form:input path="size"/></td>
		</tr>
		<tr>
			<td><form:label path="floorcount">楼宇总层数</form:label></td>
			<td><form:input path="floorcount"/><form:errors path="floorcount" cssClass="error"/></td>
			<td><form:label path="comment">备注信息</form:label></td>
			<td><form:input path="comment"/></td>
		</tr>
		<tr>
			<td colspan="4"><input type="submit"/></td>
		</tr>
	</table>
</form:form>
</body>
</html>